import { defineStore } from 'pinia'

export const useLiveStore = defineStore('live', {
    state: () => ({
        currentLive: null,
        liveProducts: [],
        merchantList: [],
        queryDto: {
            merchantId: null,
            status: null
        }
    }),
    actions: {
        setCurrentLive(live) {
            this.currentLive = live
        },
        setLiveProducts(products) {
            this.liveProducts = products
        },
        setMerchantList(merchants) {
            this.merchantList = merchants
        },
        setQueryDto(query) {
            this.queryDto = query
        },
        clearState() {
            this.currentLive = null
            this.liveProducts = []
        }
    }
})